package com.example.survey23.service.impl;

import com.example.survey23.entity.SurveyBase;
import com.example.survey23.mapper.SurveyBaseMapper;
import com.example.survey23.service.SurveyBaseService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 23Group
 * @since 2022-11-01
 */
@Service
public class SurveyBaseServiceImpl extends ServiceImpl<SurveyBaseMapper, SurveyBase> implements SurveyBaseService {

    @Autowired
    SurveyBaseMapper surveyBaseMapper;
    public List<SurveyBase> getSurveyByStatus(int state){
        return surveyBaseMapper.getSurveyByStatus(state);
    }

    public Long getMaxSurveyBaseId(){
        return surveyBaseMapper.getMaxSurveyBaseId();
    }
    public SurveyBase findById(String id){return surveyBaseMapper.selectById(id);}
}
